const mongoose = require('mongoose');
const { ObjectId } = mongoose.Schema;

/**
 * Export model definition object.
 */
module.exports = {
  creatorId: ObjectId,
  projectName: String,
  lastVersionId: ObjectId,
  visitAt: Date,
  finishAt: Date,
  status: { type: Number, default: 0 },
  description: { type: String, default: '' },
  repository: {
    type: { type: String, default: 'git' },
    url: String,
  },
  key: { type: String, unique: true },
  sharedUserGroup: [ObjectId],
};
